//
//  DelegateController.m
//  ProjectForCustomer
//
//  Created by 钟游 on 2019/8/25.
//  Copyright © 2019年 钟游. All rights reserved.
//

#import "DelegateController.h"
#import "LoginViewModel.h"
#import "DelegateMainView.h"

@interface DelegateController ()
@property(nonatomic,strong)DelegateMainView * mainView;
@property(nonatomic,strong)LoginViewModel * viewModel;
@end

@implementation DelegateController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = [self.urlPath isEqualToString:@"policy"]?@"现在电影APP用户协议":@"现在电影APP隐私政策";
}
-(void)zy_getNewData{
    
    [self.viewModel.wbSubject sendNext:[self.urlPath isEqualToString:@"policy"]?@"http://mlk.web.chuanyingtech.com/ua.html":@"http://mlk.web.chuanyingtech.com/pp.html"];
}
-(void)zy_addSubviews{
    self.mainView.frame = self.view.bounds;
    [self.view addSubview:self.mainView];
}
-(void)zy_bindViewModel{
}
#pragma mark --lazy
-(DelegateMainView *)mainView{
    if (!_mainView) {
        _mainView=[[DelegateMainView alloc]initWithViewModel:self.viewModel];
    }
    return _mainView;
}
-(LoginViewModel *)viewModel{
    if (!_viewModel) {
        _viewModel=[[LoginViewModel alloc]init];
    }
    return _viewModel;
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
